﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="initial.aspx.cs" Inherits="AnyOffice.general.system.address.initial" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
    <title>通讯录</title>
    <meta name="CODE_LANGUAGE" content="C#">
    <meta name="vs_defaultClientScript" content="JavaScript">
    <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
    <script>
        function add_detail(address_id) {
            URL = "address_detail.aspx?address_id=" + address_id;
            myleft = (screen.availWidth - 500) / 2;
            window.open(URL, "detail", "height=550,width=400,status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,top=50,left=" + myleft + ",resizable=yes");
        }

        function delete_add(address_id) {
            msg = '确认要删除该联系人么？';
            if (window.confirm(msg)) {
                URL = "address_delete.aspx?address_id=" + address_id;
                window.location = URL;
            }
        }

    </script>
</head>
<body class="bodycolor" topmargin="5">
    <form id="Form1" method="post" runat="server">
    <table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
        <tr>
            <td class="Big">
                <img src="/images/menu/address.gif" align="absMiddle"><span class="big3"> 索引结果
                    <% = ViewState["NavPromat"] %></span>
            </td>
        </tr>
    </table>
    <br>
    <asp:Repeater ID="rptAddress" runat="server" EnableViewState="False">
        <HeaderTemplate>
            <table border="0" cellspacing="1" width="95%" class="small" bgcolor="#000000" cellpadding="3">
                <tr class="TableHeader">
                    <td nowrap align="center">
                        机构名称
                    </td>
                    <td nowrap align="center">
                        负责人
                    </td>
                    <td nowrap align="center">
                        联系电话
                    </td>
                    <td nowrap align="center">
                        值班电话
                    </td>
                    <td nowrap align="center">
                        手机
                    </td>
                    <td nowrap align="center">
                        机构地址
                    </td>
                    <td nowrap align="center">
                        操作
                    </td>
                </tr>
        </HeaderTemplate>
        <ItemTemplate>
            <tr class="TableLine1">
                <td nowrap align="center">
                    <a href="javascript:add_detail('<%#Eval("AddressId")%>');">
                        <%#Eval("DeptName")%></a>
                </td>
                <td nowrap align="center">
                    <%#Eval("Name")%>
                </td>
                <td nowrap align="center">
                    <%#Eval("DeptTel")%>
                </td>
                <td nowrap align="center">
                    <%#Eval("DeptFax")%>
                </td>
                <td nowrap align="center">
                    <a title="发送手机短信" href="/general/mobile/new.aspx?mobile=<%#Eval("Mobile")%>">
                        <%#Eval("Mobile")%></a>
                </td>
                <td nowrap align="center">
                    <%#Eval("DeptAddr")%>
                </td>
                <td nowrap align="center" width="100">
                    <a href="javascript:add_detail('<%#Eval("AddressId")%>');">详情</a> <a href="address_edit.aspx?address_id=<%#Eval("AddressId")%>">
                        编辑</a> <a href="javascript:delete_add(<%#Eval("AddressId")%>);">删除</a>
                </td>
            </tr>
        </ItemTemplate>
        <AlternatingItemTemplate>
            <tr class="TableLine2">
                <td nowrap align="center">
                    <a href="javascript:add_detail('<%#Eval("AddressId")%>');">
                        <%#Eval("DeptName")%></a>
                </td>
                <td nowrap align="center">
                    <%#Eval("Name")%>
                </td>
                <td nowrap align="center">
                    <%#Eval("DeptTel")%>
                </td>
                <td nowrap align="center">
                    <%#Eval("DeptFax")%>
                </td>
                <td nowrap align="center">
                    <a title="发送手机短信" href="/general/mobile/new.aspx?mobile=<%#Eval("Mobile")%>">
                        <%#Eval("Mobile")%></a>
                </td>
                <td nowrap align="center">
                    <%#Eval("DeptAddr")%>
                </td>
                <td nowrap align="center" width="100">
                    <a href="javascript:add_detail('<%#Eval("AddressId")%>');">详情</a> <a href="address_edit.aspx?address_id=<%#Eval("AddressId")%>">
                        编辑</a> <a href="javascript:delete_add(<%#Eval("AddressId")%>);">删除</a>
                </td>
            </tr>
        </AlternatingItemTemplate>
        <FooterTemplate>
            </table>
        </FooterTemplate>
    </asp:Repeater>
    <asp:Literal ID="litMessage" runat="server"></asp:Literal>
    </form>
</body>
</html>
